﻿namespace $safeprojectname$.Examples
open $safeprojectname$
open System.ComponentModel

[<DisplayName("Example Console Lab")>]
[<Description("A cross-platform lab with input and output.")>]
type public ExampleConsoleLab() =
    inherit BaseConsoleLab()
        override BaseConsoleLab.Main() =
            base.TraceLine "Call the TraceLine method to write messages to the console."
            base.TraceLine()

            base.TraceSuccess "Call the semantic"
            base.TraceError "Trace* methods"
            base.TraceWarning "to write messages"
            base.TraceFailure "in various colors."

            base.TraceLine()
            base.TraceLine "Call the WaitForKey method to consume the next key press."
            base.TraceLine "Press a key..."

            let key = base.WaitForKey()
            
            base.TraceLine()
            base.TraceLine("You pressed: {0}", key.Key)

            base.TraceLine()
            base.TraceLine "Call the PressAnyKeyToContinue method to pause the lab."

            base.PressAnyKeyToContinue() |> ignore

            base.TraceLine()
            base.TraceLine "Call the UserInput method to acquire user input."

            let input = base.UserInput("Enter text> ")

            base.TraceLine()
            base.TraceLine("You entered: {0}", input)